﻿<Application x:Class="WpfIPodControlsTest.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    StartupUri="Window1.xaml">
    <Application.Resources>

        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/IPodControls;;component\themes/generic.xaml" />
            </ResourceDictionary.MergedDictionaries>            
            
        <!--<DrawingBrush x:Key="moredetailsBrush">
            <DrawingBrush.Drawing>
                <DrawingGroup>
                    <GeometryDrawing>
                        <GeometryDrawing.Brush>
                            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                <GradientStop Color="#DEDFE1" Offset="0"/>
                                <GradientStop Color="#A3A3A3" Offset="1"/>
                            </LinearGradientBrush>
                        </GeometryDrawing.Brush>
                        <GeometryDrawing.Geometry>
                            <EllipseGeometry RadiusX="27" RadiusY="27"></EllipseGeometry>
                        </GeometryDrawing.Geometry>
                    </GeometryDrawing>
                    <GeometryDrawing Brush="White">
                        <GeometryDrawing.Geometry>
                            <EllipseGeometry RadiusX="23" RadiusY="23"></EllipseGeometry>
                        </GeometryDrawing.Geometry>
                    </GeometryDrawing>
                    <GeometryDrawing>
                        <GeometryDrawing.Brush>
                            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                <GradientStop Color="#79A6E1" Offset="0"/>
                                <GradientStop Color="#3F6DA9" Offset="1"/>
                            </LinearGradientBrush>
                        </GeometryDrawing.Brush>
                        <GeometryDrawing.Geometry>
                            <CombinedGeometry GeometryCombineMode="Exclude">
                                <CombinedGeometry.Geometry1>
                                    <EllipseGeometry RadiusX="19" RadiusY="19"></EllipseGeometry>
                                </CombinedGeometry.Geometry1>
                                <CombinedGeometry.Geometry2>
                                    <GeometryGroup>
                                        <GeometryGroup.Transform>
                                            <TransformGroup>
                                                <RotateTransform Angle="135"/>
                                                <TranslateTransform X="8" />
                                            </TransformGroup>
                                        </GeometryGroup.Transform>
                                        <RectangleGeometry Rect="0,0,4,15" RadiusX="0" RadiusY="0"></RectangleGeometry>
                                        <RectangleGeometry Rect="4,0,11,4" RadiusX="0" RadiusY="0"></RectangleGeometry>
                                    </GeometryGroup>
                                </CombinedGeometry.Geometry2>
                            </CombinedGeometry>
                        </GeometryDrawing.Geometry>
                    </GeometryDrawing>

                </DrawingGroup>
            </DrawingBrush.Drawing>
        </DrawingBrush>-->

        <!--<DrawingBrush x:Key="backgroundListBrush" Viewport="2,2,7,7"  ViewportUnits="Absolute" TileMode="Tile">
            <DrawingBrush.Drawing>
                <DrawingGroup>
                    <GeometryDrawing>
                        <GeometryDrawing.Geometry>
                            <GeometryGroup>
                                <LineGeometry StartPoint="0,0" EndPoint="0,100"/>
                            </GeometryGroup>
                        </GeometryDrawing.Geometry>
                        <GeometryDrawing.Pen>
                            <Pen Thickness="3">
                                <Pen.Brush>
                                    <LinearGradientBrush>
                                        <GradientStop Offset="0.0" Color="#CCD3DD" />
                                        <GradientStop Offset="1.0" Color="#CDD2D8" />
                                    </LinearGradientBrush>
                                </Pen.Brush>
                            </Pen>
                        </GeometryDrawing.Pen>
                    </GeometryDrawing>
                    <GeometryDrawing>
                        <GeometryDrawing.Geometry>
                            <GeometryGroup>
                                <LineGeometry StartPoint="2,0" EndPoint="2,100"/>
                            </GeometryGroup>
                        </GeometryDrawing.Geometry>
                        <GeometryDrawing.Pen>
                            <Pen Thickness="4">
                                <Pen.Brush>
                                    <LinearGradientBrush>
                                        <GradientStop Offset="0.0" Color="#C5CCD6" />
                                        <GradientStop Offset="1.0" Color="#C6CBD1" />
                                    </LinearGradientBrush>
                                </Pen.Brush>
                            </Pen>
                        </GeometryDrawing.Pen>
                    </GeometryDrawing>
                </DrawingGroup>
            </DrawingBrush.Drawing>
        </DrawingBrush>


        <Style x:Key="ScrollBarPageButton" TargetType="{x:Type RepeatButton}">
            <Setter Property="SnapsToDevicePixels" Value="True"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="IsTabStop" Value="false"/>
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type RepeatButton}">
                        <Border Background="Transparent"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="HorizontalScrollBarThumb" TargetType="{x:Type Thumb}">
            <Setter Property="SnapsToDevicePixels" Value="True"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="IsTabStop" Value="false"/>
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Thumb}">
                        <Grid Background="Transparent">
                            <Border
                Height="8"
                Background="#747474"
                BorderThickness="0.5,1"
                CornerRadius="3"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="VerticalScrollBarThumb" TargetType="{x:Type Thumb}">
            <Setter Property="SnapsToDevicePixels" Value="True"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="IsTabStop" Value="false"/>
            <Setter Property="Focusable" Value="false"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Thumb}">
                        <Grid Background="Transparent">
                            <Border
                Width="8"
                Background="#747474"
                BorderThickness="1,0.5"
                CornerRadius="3"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
            <Grid Width="8">
                <Border Width="8" Background="Transparent" CornerRadius="3"/>
                <Track Name="PART_Track" IsDirectionReversed="true">
                    <Track.DecreaseRepeatButton>
                        <RepeatButton Command="ScrollBar.PageUpCommand" Style="{StaticResource ScrollBarPageButton}"/>
                    </Track.DecreaseRepeatButton>
                    <Track.Thumb>
                        <Thumb x:Name="Thumb" Opacity="0.25" Style="{StaticResource VerticalScrollBarThumb}"/>
                    </Track.Thumb>
                    <Track.IncreaseRepeatButton>
                        <RepeatButton Command="ScrollBar.PageDownCommand" Style="{StaticResource ScrollBarPageButton}"/>
                    </Track.IncreaseRepeatButton>
                </Track>
            </Grid>
            <ControlTemplate.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Trigger.EnterActions>
                        <BeginStoryboard>
                            <Storyboard>
                                <DoubleAnimation
                  Duration="0:0:0.25"
                  Storyboard.TargetName="Thumb"
                  Storyboard.TargetProperty="Opacity"
                  To="1"/>
                            </Storyboard>
                        </BeginStoryboard>
                    </Trigger.EnterActions>
                    <Trigger.ExitActions>
                        <BeginStoryboard>
                            <Storyboard>
                                <DoubleAnimation Duration="0:0:0.25" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="Opacity"/>
                            </Storyboard>
                        </BeginStoryboard>
                    </Trigger.ExitActions>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>
        <ControlTemplate x:Key="HorizontalScrollBar" TargetType="{x:Type ScrollBar}">
            <Grid Height="8">
                <Border Height="8" Background="#18000000" CornerRadius="3"/>
                <Track Name="PART_Track" IsDirectionReversed="false">
                    <Track.DecreaseRepeatButton>
                        <RepeatButton Command="ScrollBar.PageUpCommand" Style="{StaticResource ScrollBarPageButton}"/>
                    </Track.DecreaseRepeatButton>
                    <Track.Thumb>
                        <Thumb x:Name="Thumb" Opacity="0.25" Style="{StaticResource HorizontalScrollBarThumb}"/>
                    </Track.Thumb>
                    <Track.IncreaseRepeatButton>
                        <RepeatButton Command="ScrollBar.PageDownCommand" Style="{StaticResource ScrollBarPageButton}"/>
                    </Track.IncreaseRepeatButton>
                </Track>
            </Grid>
            <ControlTemplate.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Trigger.EnterActions>
                        <BeginStoryboard>
                            <Storyboard>
                                <DoubleAnimation
                  Duration="0:0:0.25"
                  Storyboard.TargetName="Thumb"
                  Storyboard.TargetProperty="Opacity"
                  To="1"/>
                            </Storyboard>
                        </BeginStoryboard>
                    </Trigger.EnterActions>
                    <Trigger.ExitActions>
                        <BeginStoryboard>
                            <Storyboard>
                                <DoubleAnimation Duration="0:0:0.25" Storyboard.TargetName="Thumb" Storyboard.TargetProperty="Opacity"/>
                            </Storyboard>
                        </BeginStoryboard>
                    </Trigger.ExitActions>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>
        <Style TargetType="{x:Type ScrollBar}">
            <Setter Property="SnapsToDevicePixels" Value="True"/>
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="Template" Value="{StaticResource VerticalScrollBar}"/>
            <Style.Triggers>
                <Trigger Property="Orientation" Value="Horizontal">
                    <Setter Property="Template" Value="{StaticResource HorizontalScrollBar}"/>
                </Trigger>
            </Style.Triggers>
        </Style>
        <Style TargetType="{x:Type ScrollViewer}">
            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ScrollViewer}">
                        <Grid x:Name="Grid" Background="{TemplateBinding Background}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <ScrollContentPresenter
                x:Name="PART_ScrollContentPresenter"
                                
                Margin="0,0,0,0"
                CanHorizontallyScroll="False"
                CanVerticallyScroll="False"/>
                            <ScrollBar
                x:Name="PART_VerticalScrollBar"
                Grid.Column="1"
                Grid.Row="0"
                Margin="0,1,0,1"
                AutomationProperties.AutomationId="VerticalScrollBar"
                Maximum="{TemplateBinding ScrollableHeight}"
                Minimum="0"
                Value="{Binding Path=VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
                ViewportSize="{TemplateBinding ViewportHeight}"
                Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="{x:Type ListBoxItem}" TargetType="{x:Type ListBoxItem}">
            <Setter Property="Background" Value="Transparent" />
            <Setter Property="Padding" Value="0,0,0,0" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListBoxItem}">
                        <Border Name="Bd" Background="{TemplateBinding Background}" 
                                BorderBrush="{TemplateBinding BorderBrush}" 
                                BorderThickness="{TemplateBinding BorderThickness}" 
                                Padding="{TemplateBinding Padding}" 
                                SnapsToDevicePixels="true">
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsSelected" Value="true">
                                <Setter TargetName="Bd" Value="{x:Static SystemColors.HighlightBrush}" Property="Background" />
                                <Setter Value="{x:Static SystemColors.HighlightTextBrush}" Property="Foreground" />
                            </Trigger>
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="IsSelected" Value="true" />
                                    <Condition Property="Selector.IsSelectionActive" Value="false" />
                                </MultiTrigger.Conditions>
                                <Setter TargetName="Bd" Value="{x:Static SystemColors.ControlBrush}" Property="Background" />
                                <Setter Value="{x:Static SystemColors.ControlTextBrush}" Property="Foreground" />
                            </MultiTrigger>
                            <Trigger Property="IsEnabled" Value="false">
                                <Setter Value="{x:Static SystemColors.GrayTextBrush}" Property="Foreground" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="{x:Type ListBox}" TargetType="{x:Type ListBox}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListBox}">
                        <ScrollViewer HorizontalScrollBarVisibility="Auto"  
          Background="{StaticResource backgroundListBrush}">
                            <Border  CornerRadius="5" Margin="5,10,1,10" BorderBrush="#AAABAF" BorderThickness="1" Background="White">
                                <ItemsPresenter />
                            </Border>
                        </ScrollViewer>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>-->
        </ResourceDictionary>
    </Application.Resources>
</Application>
